<?php

/**
 * 前台基础
 * @author 	xiaobai
 * @date 	2017-01-03
 */

namespace app\common\controller;

use think\Controller;
use app\common\model\Column;
use app\common\model\Ip;

class Homebase extends Controller
{
    public function initialize()
    {
        // 网页版权
        $site_model = model('common/Site');
        $site = $site_model->find();
        $this->assign('site', $site);

        // 栏目内容
        $column_model = new Column();
        $column_lists = $column_model->getColumnNavBar();
        $this->assign('column_list', $column_lists);

        $ip_model = new Ip();
        $ip_model->saveVisitIpData();

        $user_info = get_login_user_info();
        $this->assign('userInfo', $user_info);
    }
}
